package com.lagou.sqlSession;

import java.util.List;

/**
 * @author czq
 * @date 2020/6/21 0:26
 * @description
 */
public interface SqlSession {

    // 查询所有
    <E> List<E> selectList(String statementId, Object... params) throws Exception;

    // 根据条件查询单个
    <T> T selectOne(String statementId, Object... params) throws Exception;

    // 新增用户
    int saveUser(String statementId, Object... params) throws Exception;

    // 修改用户
    int updateUser(String statementId, Object... params) throws Exception;

    // 删除用户
    int deleteUser(String statementId, Object... params) throws Exception;

    // 为 Dao 接口生成代理实现类
    <T> T getMapper(Class<?> mapperClass);
}
